import moment from 'moment'

process.on('unhandledRejection', err => {
    //think.log(err);
});

let proto = Object.getPrototypeOf(require);
!proto.hasOwnProperty("ensure") && Object.defineProperties(proto, {
    "ensure": {
        value: function ensure(modules, callback) {
            callback(this);
        },
        writable: false
    },
    "include": {
        value: function include() {},
        writable: false
    }
});

global.__uri = function(src) {
    return src;
};

global.G = {
    root: '/integralmall',
    project: 'ec_integralmall'
};
G.path = {
    api: G.root + '/api'
};

moment.serverNow = function() {
    return moment.now();
};